package org.snia.cdmi;

public enum LinkSitePermission {

    Public("pubic"),

    Protected("protected"),

    Private("private");

    public static LinkSitePermission fromValue(String permission) throws IllegalArgumentException {
    	if(permission == null){
    		return null;
    	}
    	
        for (LinkSitePermission storageClass : LinkSitePermission.values()) {
            if (storageClass.toString().equals(permission)) return storageClass;
        }

        throw new IllegalArgumentException(
                "Cannot create enum from " + permission + " value!");
    }


    private final String permission;

    private LinkSitePermission(String permission) {
        this.permission = permission;
    }

    /* (non-Javadoc)
     * @see java.lang.Enum#toString()
     */
    @Override
    public String toString() {
        return permission;
    }

}